<{:W('Bizhome/header',array($biz_item_num,$user))}>
    <div class="right_box">
		<div class="content">
			<div class="head_box">
				<h2>球会列表</h2>
			</div>
			
			<div class="info_table">
				<table>
					<tbody>
						<tr>
							<th>俱乐部名称</th>
							<th>所属省市</th>
							<th>所在区域</th>
							<th>功能</th>
						</tr>
					<foreach name="data" item="vo" key="k" >
						<!-- <input type="hidden" name="competition_id" value="<{$vo.competition_id}>" /> -->
                        <tr class="alt">
                         	<td><{$vo.name}><input type="hidden" class="club_id" value="<{$vo.id}>"></td>                     
                         	<td class="detail">
                         		<{$vo.club_province}><br>
                         		<{$vo.club_city}><br>		
                         	</td>
                         	<td class="detail"><{$vo.club_district}></td>
                         	<td>
                         		<button onclick="club_detail(<{$k}>)">详情</button>
                         		<button onclick="edit_club(<{$k}>)">修改</button>
								<button onclick="announce_create(<{$k}>)">发布公告</button>
								<button onclick="activity_create(<{$k}>)">发布活动</button>
								<button onclick="club_join(<{$k}>)">批准加入</button>
								<button onclick="club_kick(<{$k}>)">移除会员</button>
                          	</td>
                        </tr> 
                    </foreach>					              
					</tbody>
				</table>
				
			</div>	
			
			
	</div>	
</div>
<script>
var select_club_set = document.getElementsByClassName("club_id");
function club_detail(num)
	{
	 selected=select_club_set[num].value;
	  
	  layer.open({
                 type: 2,
                 title: '球会详情',
                 maxmin: true,
                 shadeClose: true, //点击遮罩关闭层
                 area : ['400px' , '300px'],
                 content: 'club_detail.html'
				 });
	}
function edit_club(num)
{
     selected=select_club_set[num].value;
	 $.post('__URL__/clubDetail',{'club_id':selected},function(resultList){ 			   
			  msg=resultList.result.club_status;
			  if (msg!=0) {
			    layer.msg('球会已正常运作，不能修改');
			  }
			  else 
			  {
			     layer.open({
                 type: 2,
                 title: '修改球会',
                 maxmin: true,
                 shadeClose: true, //点击遮罩关闭层
                 area : ['600px' , '420px'],
                 content: 'edit_club.html'
				 });
			  }
    	     },'json'); 
}
function club_join(num)
{
	 selected=select_club_set[num].value;
	 layer.open({
                 type: 2,
                 title: '申请详情',
                 maxmin: true,
                 shadeClose: true, //点击遮罩关闭层
                 area : ['600px' , '420px'],
                 content: 'apply_people.html'
				 });
}

function club_kick(num)
{
  selected=select_club_set[num].value;
	 layer.open({
                 type: 2,
                 title: '会员详情',
                 maxmin: true,
                 shadeClose: true, //点击遮罩关闭层
                 area : ['600px' , '420px'],
                 content: 'remove_member.html'
				 });
}
function announce_create(num)
{
selected=select_club_set[num].value;
	 layer.open({
                 type: 2,
                 title: '会员详情',
                 maxmin: true,
                 shadeClose: true, //点击遮罩关闭层
                 area : ['600px' , '420px'],
                 content: 'club_announce_create.html'
				 });
}
function activity_create(num)
{
selected=select_club_set[num].value;
	 layer.open({
                 type: 2,
                 title: '会员详情',
                 maxmin: true,
                 shadeClose: true, //点击遮罩关闭层
                 area : ['600px' , '420px'],
                 content: 'add_club_activity.html'
				 });
}
</script>
<{:W('Bizhome/footer')}>
